<template>
	<view>
		<u-toast ref="uToast"></u-toast>
		<view class="title">业务服务</view>
		<view class="grid">
			<u-grid :border="false" col="4" class="">
				<u-grid-item v-for="(baseListItem,index) in baseList" :key="index" @click="goDetail(index)">

					<u-image :src="baseListItem.name" width="50px" height="50px"></u-image>
					<text class="grid-text">{{baseListItem.title}}</text>

				</u-grid-item>
			</u-grid>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				itemTabs: [{
					name: '今日'
				}, {
					name: '昨日'
				}, {
					name: '本月'
				}],
				baseList: [{
						name: 'http://118.31.238.190/home/icon_menu_3.png',
						title: '业务拓展'
					},
					{
						name: 'http://118.31.238.190/home/icon_menu_6.png',
						title: '终端管理'
					},
					{
						name: 'http://118.31.238.190/home/icon_menu_1.png',
						title: '激活统计'
					}, {
						name: 'http://118.31.238.190/home/icon_menu_2.png',
						title: '交易统计'
					}, {
						name: 'http://118.31.238.190/home/icon_menu_4.png',
						title: '商户管理'
					}, {
						name: 'http://118.31.238.190/home/icon_menu_5.png',
						title: '下级管理'
					}, {
						name: 'http://118.31.238.190/home/icon_menu_9.png',
						title: '排行榜'
					}
				]
			}
		},
		methods: {
			goDetail(index) {
				if (index == 0) {
					this.$u.route('packageC/pages/business/business')
				} else if (index == 1) {
					this.$u.route('packageB/pages/main/terminal/terminalManager')
					// this.$u.route('/pages/echartsShow/echartsArea')
				} else if (index == 2) {
					this.$u.route('packageB/pages/main/terminal/activeStatistic')
				} else if (index == 3) {
					this.$u.route('packageB/pages/main/trade/trade-list')
				} else if (index == 4) {
					this.$u.route('packageA/pages/main/merchant/merchant-list')
				} else if (index == 5) {
					this.$u.route('packageA/pages/main/agent/agent-list')
				} else if (index == 6) {
					this.$u.route('packageD/pages/rank/rank-list')
				}

			}
		},
	}
</script>

<style lang="scss" scoped>
	.title {
		font-weight: bold;
		margin-top: 20rpx;
		background: white;
		padding: 20rpx 0 0 20rpx;
	}

	.grid {
		background-color: white;
	}

	.grid-text {
		font-size: 13px;
		padding: 10rpx 0 20rpx 0rpx;
		box-sizing: border-box;
		font-weight: bold;
	}
</style>